package com.heima.feign.article;

import com.heima.model.article.dto.ArticleDto;
import com.heima.model.article.entity.ApArticle;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("leadnews-article")
public interface ArticleFeignClient {

    @PostMapping("/api/v1/article/save")
    public ResponseResult save(@RequestBody ArticleDto dto);

    @PostMapping("/api/v1/article/query")
    public ApArticle queryByNewsId(@RequestParam("newsId") Long newsId);
}
